package com.gdk.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gdk.dao.CouponDao;
import com.gdk.service.CouponService;



@Service
public class CouponServiceImpl implements CouponService {
	@Autowired
	private CouponDao couponDao;
	/**
	 * 新增优惠券
	 */
	@Override
	public int doAddCoupon(Map<String, Object> map) {
		return couponDao.addCoupon(map);
	}
	/**
	 * 查询所有优惠券
	 * */
	@Override
	public List<Map<String, Object>> doFindAllCoupon() {
		List<Map<String, Object>> allCoupon = couponDao.findAllCoupon();
		return allCoupon;
	}
	/**
	 * 修改优惠券状态
	 * */
	@Override
	public int doUpdateCouponStatus(Map<String, Object> map) {
		
		return couponDao.updateCouponStatus(map);
	}
	/**
	 * 查看门票详情
	 * */
	@Override
	public Map<String, Object> doFindCouponDetails(Map<String, Object> map) {
		return couponDao.findCouponDetails(map);
	}
	/**
	 * 修改门票状态
	 * */
	@Override
	public int doUpdateCouponDetails(Map<String, Object> map) {
		return couponDao.updateCouponDetails(map);
	}
}
